My original idea behind having the Unix class being a subclass of Process (or SubProcess as the case may be) was such that commands like 'cp, mv, ln, etc' are processes and should be treated is such. Then I could have the commands run in the foreground/background, whatever. The Process class would handle it.
The idea behind the File class was that it would be a generic class deaing with a file descriptor, not a file. The file descriptor could then be hooked up to anything the class could handle. For the File class, this could indeed be a file, but it also might be stdout or stderr. I didn't mean to imply that it dealt with files but with input/output which is done to a file descriptor.
This division of the two, to me at least, makes much more sense considering what the two classes would be responsible for doing.
The trick here is that with OpenStep up and coming,
we will have to be very careful that only certain
subclasses or categories introduce OS dependencies.
That's one of the reason's why I thought this class would be great. Even if OS dependencies are introduced, they can be handled in the class code which would free us developers up from having to do all kinds of fancy tricks to handle OS dependencies in our code. The methods would perform the same on whatever platform.
Oh, and I _really_ think that it
would be handy to have a subclass of the file object
to deal with directories. That would sure make
surfing through a filesystem a cakewalk!
Yeah, that would be pretty cool. But I'm not sure if a class for looking through directories would fit under a class for I/O on a file descriptor. Maybe more thought is needed on exactly how to divide these types of classes up. I suppose a directory would just be a file descriptor, with some specialized commands to search through the I/O stream.
As to the logging, yes, both a "priority level"
_and_ a mask would be useful. I'm more in favor
of a mask, though.
The mask idea is great, but exactly how portable would that be?
Well, who's our file handling guru gonna be, then?
I'd love to do it, but I doubt I know enough about all the different things that can be done to file descriptors. I'd definitely like to help if any input is needed.
(PS: more objects: Sean Luke's sound meters and other
stuff is almost ready. Looking real nice. He's even
got a little example app that sits there and lights up
whenever there's noise in the room. Rather unnerving.)